package com.yunhe.authority.service.authority;

import com.yunhe.authority.domain.authority.StationStaticData;
import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.exception.ObjectNotFoundException;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

/**
 * 电站静态数据Service
 * @author zhengbo
 * @date 2020/11/3 14:46
 */
public interface StationStaticDataService {

    /**
     * 创建电站静态数据
     * @param stationId 电站ID
     * @param stationStaticData 电站静态数据
     * @return StationStaticData
     */
    @Transactional(rollbackFor = Exception.class, transactionManager = "transactionManager")
    StationStaticData creatStationStaticData(Long stationId, StationStaticData stationStaticData) throws ArgumentErrorException, ObjectNotFoundException;

    /**
     * 更新电站静态数据
     * @param stationId 电站ID
     * @param stationStaticData 电站静态数据
     * @return StationStaticData
     */
    @Transactional(rollbackFor = Exception.class, transactionManager = "transactionManager")
    StationStaticData updateStationStaticDataByStationId(Long stationId, StationStaticData stationStaticData) throws ArgumentErrorException, ObjectNotFoundException;

    /**
     * 更新指定字段
     * @return  StationStaticData
     * @throws ArgumentErrorException
     */
    @Transactional(rollbackFor = Exception.class, transactionManager = "transactionManager")
    StationStaticData updateStationStaticData(Long stationId,
                                              Long id,
                                              Double area,
                                              Double taxes,
                                              Long ssCompNum,
                                              Long intendSsCompNum,
                                              Long allOfficeNum,
                                              Long solvingEmployment,
                                              Long electromechanicalCompNum,
                                              Long packingCompNum,
                                              Long materialsCompNum,
                                              Long automotiveCompNum,
                                              Long foodCompNum,
                                              Long otherCompNum,
                                              Long industryNum,
                                              String[] compStarListMonth,
                                              String[] compStarListYear,
                                              Double aouCompNumAbove3000,
                                              Double aouCompNumAbove5000,
                                              Double aouCompNumAbove10000,
                                              Long mediumAlarmNum,
                                              Long mediumAlarmProcessingRate,
                                              Long heaviestAlarmNum,
                                              Long heaviestAlarmProcessingRate,
                                              Double waterConsumptionDay,
                                              Double waterConsumptionMonth,
                                              Double waterConsumptionYear,
                                              String[] waterConsumptionDayList,
                                              String[] waterConsumptionMonthList,
                                              String[] waterConsumptionYearList,
                                              Double sharpElectricityDay,
                                              Double peakElectricityDay,
                                              Double flatElectricityDay,
                                              Double valleyElectricityDay,
                                              Double sharpElectricityMonth,
                                              Double peakElectricityMonth,
                                              Double flatElectricityMonth,
                                              Double valleyElectricityMonth,
                                              Double sharpElectricityYear,
                                              Double peakElectricityYear,
                                              Double flatElectricityYear,
                                              Double valleyElectricityYear,
                                              Double smartDevicesFeesDay,
                                              Double materialsFeesDay,
                                              Double environmentFeesDay,
                                              Double smartDevicesFeesMonth,
                                              Double materialsFeesMonth,
                                              Double environmentFeesMonth,
                                              Double smartDevicesFeesYear,
                                              Double materialsFeesYear,
                                              Double environmentFeesYear,
                                              String[] alarmList,
                                              String[] loadForecastListDay,
                                              String[] loadForecastListMonth,
                                              String[] loadForecastListYear
                                              ) throws ArgumentErrorException, ObjectNotFoundException;

    /**
     * 根据电站ID查询电站静态数据
     * @param stationId 电站ID
     * @return StationStaticData
     */
    StationStaticData findByStationId(Long stationId);
}
